<div class="main-container">
    <div class="main-content">
        <nz-tabset class="content-tab year-plan-tab"
                   [(nzSelectedIndex)]="tabIndex"
                   (nzSelectChange)="tabOnChange()">
            <nz-tab nzTitle="所计划审核">
                <div class="content-top-bar">
                    <div class="search-box" >
                        <nz-form-item nzFlex class="mr-10">
                            <nz-form-label>年份</nz-form-label>
                            <nz-form-control>
                                <nz-year-picker
                                        [(ngModel)]="year"
                                        [nzDisabledDate]="disabledDate"
                                        (ngModelChange)="getApproveData()">
                                </nz-year-picker>
                            </nz-form-control>
                        </nz-form-item>
                        <nz-form-item nzFlex class="mr-10">
                            <nz-form-label>所</nz-form-label>
                            <nz-form-control>
                                <nz-form-control>
                                    <nz-select nzAllowClear [(ngModel)]="sectionId" (ngModelChange)="getApproveData()" >
                                        <nz-option [nzLabel]="'一所'" [nzValue]="'168'"></nz-option>
                                        <nz-option [nzLabel]="'二所'" [nzValue]="'169'"></nz-option>
                                    </nz-select>
                                </nz-form-control>
                            </nz-form-control>
                        </nz-form-item>
                        <nz-form-item nzFlex>
                            <button nz-button nzType="default" (click)="reset()">重置</button>
                        </nz-form-item>
                    </div>
                </div>
                <div class="tab-main-content">
                    <div class="table-content dark-blue-table">
                        <nz-table #myTable
                                  [nzData]="approveTableData"
                                  nzBordered
                                  nzSize="middle"
                                  [nzLoading]="loading"
                                  [nzTotal]="total"
                                  [nzPageIndex]="pageNum"
                                  [nzPageSize]="pageSize"
                                  (nzPageIndexChange)="getApproveData()">
                            <thead>
                            <tr>
                                <th style="width:150px">序号</th>
                                <th>计划名称</th>
                                <th style="width:180px">年份</th>
                                <th style="width:200px">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr *ngFor="let data of approveTableData; let idx = index">
                                <td style="width:150px">{{ idx + 1}}</td>
                                <td>{{data.name}}</td>
                                <td style="width:180px">{{data.y}}</td>
                                <td style="width:200px">
                                    <a (click)="openDetailPage('detail', data.name, data.section_id,data.y)">查看</a>
                                </td>
                            </tr>
                            </tbody>
                        </nz-table>
                    </div>
                </div>
            </nz-tab>
            <nz-tab nzTitle="年计划上报">
                <ng-template nz-tab>
                </ng-template>
            </nz-tab>
        </nz-tabset>

    </div>
</div>

